Skip to content

Conversation

andreagilardoni
Copy link
Contributor

The objective of this PR is to introduce a method to provide better error codes to our apis.

This is intended to provide:

  • Error codes, different from the generic 0 value return
  • Unified error codes values

The objective of error code class to wrap an integer that may be
returned from a function that may fail for different reasons. Since we
are not able to return values different from 0 in case of error in the
arduino language we need to wrap them into this class and redefine
boolean operator to mantain the same behaviour
The objective of ReturnValue is to maintain coherency with ErrorCode
class in cases where a single value is used to represent both the error
and the return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants